package cn.smbms.dao.user;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.smbms.pojo.User;

public interface UserMapper {
	public User findByUserCode(@Param(value = "userCode") String userCode);
	
	List<User> findList(@Param(value = "userName")String name,
			@Param(value = "userRole") Integer roleId,
			@Param(value = "startIndex") Integer startIndex,
			@Param(value = "pageSize") Integer pageSize);
	
	public int count(@Param(value = "userName")String userName, @Param(value = "userRole")Integer userRole);
	
	public User findListUser(Integer id);
	
	/**
	 * �����û�
	 */
	public int addUser(User user);
	
	/**
	 * �޸�
	 */
	public int prinById(User user);
	
	/**
	 * 
	 */
	public int deleteUser(int uid);
	
	/**
	 * 修改密码
	 * @param newpassword
	 * @param id
	 * @return
	 */
	public int updatePwd(@Param(value = "newpassword")String newpassword,@Param(value = "id")Integer id);
}
